package com.edais.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.edais.domain.RunningSignUpInfo;
import com.edais.persistence.RunningMapper;

@Repository

public class RunningDao {
	
	@Autowired
	private RunningMapper runningMapper;
	
	public void addRunningSignUpInfo(RunningSignUpInfo runningInfo) throws Exception {
		runningMapper.addRunningSignUpInfo(runningInfo);
	}

	public int updateRunningSignUpInfo(RunningSignUpInfo runningInfo) throws Exception {
		return runningMapper.updateRunningSignUpInfo(runningInfo);
	}
	/**
	 * 查询剩余名额
	 * @param runingInfo
	 * @throws Exception
	 */
	public String getSurplusPeople() {
		// TODO Auto-generated method stub
		return runningMapper.getSurplusPeople();
	}
	/**
	 * 查询报名者信息(考虑是否过期)
	 * @param runingInfo
	 * @throws Exception
	 */
	public List<RunningSignUpInfo> getEnrollInfo(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return runningMapper.getEnrollInfo(map);
	}
	public List<RunningSignUpInfo> getSignUpInInfo(Map<String, Object> map) {
		return runningMapper.getSignUpInInfo(map);
	}
	
	/**
	 * 连连支付后更新信息
	 * @param map
	 * @return
	 */
	public int updateInfoAfterLLpay(Map<String, Object> map){
		return this.runningMapper.updateInfoAfterLLpay(map);
		
	}

}
